package thread;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) throws IOException {
        /*
        System.out.println("教练我想打篮球");
        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("丑拒");

         */
        System.out.println("请输入初始数字");
        //Scanner scan=new Scanner(System.in);
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String line=br.readLine();
        int num=Integer.parseInt(line);

        //int num=scan.nextInt();
        for(int i=num;i>0;i--){
            try {
                System.out.println(i);
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        //System.out.println("0");
        System.out.println("时间到");


    }
}
